Automatic environmental compensation of capacitance based proximity sensors

ABSTRACT

Improved capacitive sensor operation is achieved with improved discrimination between environmental drift and apparent drift attributable to human proximity to the sensor. A proximity algorithm detects conditions interpreted as indicating a user is close to, but not touching, a sensor. When such proximity is detected, ambient value calibration is halted, thereby avoiding treating the human&#39;s proximity as environmental drift requiring compensation and preventing miscalculation of calibration. The proximity algorithm employs two moving-average filters (implemented in hardware or software) to monitor the CDC output values over time and to make appropriate adjustments to a signal representing the ambient, while distinguishing environmental drift from proximity-induced pseudo-drift. Accurate ambient values allow for improved proximity detection by providing this environmentally compensated average value to an adaptive threshold algorithm which features a fast attack, slow decay peak detection to automatically track and compensate for different response characteristics (typically finger sizes).

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit under 35 U.S.C. §119(e) of thefiling date of U.S. Provisional Patent Application Ser. No. 60/700,688,filed Jul. 18, 2005, which is hereby incorporated by reference.

FIELD OF INVENTION

This invention relates to capacitance-based sensing devices and to driftcompensating—i.e., sensitivity stabilizing—such devices. Moreparticularly, it relates to proximity sensors that use capacitiveeffects, and to compensating their response profiles to adjust forenvironmentally-induced drift, while avoiding misinterpreting theeffects induced by hovering hands as environmental changes. Such sensorsare frequently employed in, for example, keyboards, keypads,touch-switches and other touch-sensitive input devices.

BACKGROUND

In capacitive sensor devices, a capacitor arrangement is created andstructured so that circuitry attached to the capacitor plates can sensea change in capacitance Such a change can occur, for example, when oneplate of the capacitor is pressed toward an opposite plate by anexternally (directly or indirectly) applied touch force, or as a resultof a human hand altering the electrical field of the capacitor throughinteraction with the fringing fields around the plates. Additionally,the presence of a human finger or similar object may be sensed evenwithout an actual touching, when it is in close proximity to one plateof one or more capacitors, as the electrical field—and hence thecapacitance—of the arrangement is altered by the presence of the fingeror other object. The mere proximity of a portion of the human body, suchas a finger, can create a sufficient variation in capacitance, withoutthe need to apply pressure to a plate so as to move the plates closertogether, to permit sensing of that condition.

Unfortunately, this sensitivity to approaching fingers is problematic.It is well known that capacitive sensors also are very sensitive tocapacitance variability due to environmental changes, such as humidity,temperature, dirt, and so forth. A capacitive sensing system must,therefore, be able to distinguish reliably between capacitance changesthat are due to environmental changes and capacitance changes that aredue to an operator actually touching or approaching the sensor. It isundesirable to allow environmental changes to produce an output thatcould be interpreted as a touch or near touch. Conversely, it is alsoundesirable that a hand hovering in the vicinity of the sensor beinterpreted as an environmental condition, for doing so may cause anenvironmental compensation process to change the sensitivity profile ofthe sensor and render it insensitive to an actual touch.

In the example of FIG. 1, there is shown diagrammatically theconstruction and operation of a capacitive sensor, for tutorialpurposes. Reference will be made to this diagram in aid of explaininghow environmental factors and a “hovering” hand can complicate theoperation of such sensors, reducing their sensitivity and sometimesdoing so to the point of rendering a sensor unresponsive to a user'stouch. A differential construction is shown, with two capacitors 10A and10B sharing one plate 12 in common, but it will be appreciated thatsingle-ended designs may be substituted. Common plate 12 is connected toreceive a transmit signal 14 on line 15 from a signal source (notshown). Opposing the common plate 12 are second and third plates 16A and16B, each of which forms the second plate of a capacitor with commonplate 12. In turn, these two plates 16A and 16B are connected,respectively, to the non-inverting and inverting inputs of adifferential capacitance-to-digital converter (CDC), such as 18, having,for example, a 16-bit output. The plates (electrodes) 12 and 16 maytypically be arranged so that a portion of the electric field betweenthem, represented by lines 22, arcs into the region above or in front ofthe electrodes; most of the field, though, is directly between theelectrodes, as indicated by field lines 24. When a user's handapproaches the electrodes, it resembles to the circuit, electricallyspeaking, a large “ground” mass, and reduces the field intensity betweenthe transmitter and receiver electrodes 12, 16A and 16B, respectively.This alters the capacitance of the capacitor. The output value, or code,of CDC 18 is indicative of the close position of the ground mass (e.g.,hand). Naturally, comparable single-ended arrangements are known, aswell.

Now, referring to FIG. 2, assume that a user first presses down with afinger on the left-hand capacitor, which we will call sensor 16A, andthen withdraws that finger and then puts it on the right-hand capacitor,which we will call sensor 16B. FIG. 2 shows the ideal output 30 of theCDC. Prior to the first sensor press, between sensor presses and afterthe second sensor press, the CDC output is stable at a fairly constantambient value indicated within dotted rectangles 42. When the user'sfinger presses on sensor 16A, the output CDC value rises to a maximumoutput CDC_(max) and when the user's finger is put on sensor 16B, theCDC output falls to a minimum value CDC_(min). The output value of theCDC is read by a processor (not shown). Typically, the processor uses afirst threshold value 48 to determine when the output of the CDCindicates that the first sensor has been pressed and a second thresholdvalue 52 to indicate when the second sensor has been pressed. When athreshold is crossed, an interrupt is generated. Real-world operation,however, rarely produces such idealized operation. Rather, when theenvironment changes, the ambient value of the CDC output drifts. Withstationary thresholds, this would be quite problematic, as illustratedby the CDC value waveform 30′ in FIG. 3. There, ambient drift isindicated in the changes in ambient levels of waveform 30′ from 54 to 56to 58. As a consequence, though a finger on sensor A is still detected(i.e., threshold 48 is crossed), a finger on sensor B does not cause theCDC output value to cross the threshold 52, so no interrupt is generatedand the processor never detects that the second sensor was pressed.

This problem can be overcome if the ambient value of the CDC outputchanges due only to environmental factors and the threshold values canbe made to change with changes in the ambient CDC output. (The “ambient”value of the CDC output to be tracked is the background value of the CDCoutput with all human hands kept distant so as not to touch the sensors.This ambient value is calculated from the CDC output when the user isnot close to or touching a sensor.) More particularly, it would bedesired that the threshold values remain at equal distance from the(moving) ambient value while tracking or calibrating for environmentalchanges, but this ideal often is not achieved. FIG. 4 shows at 62 and 64the situation that would result with the threshold values 48 and 52changing to track the ambient drift. That is, both sensor pressesgenerate interrupts.

While various techniques exist to compensate for ambient drift incapacitive sensing arrangements, these approaches have not proven to beideal and, indeed, some will still permit environmentally-induced driftto allow input devices to become temporarily insensitive to touch. Forexample, with some systems, if a user's finger hovers in the vicinity ofa key or input button, but does not press the key or button, thehovering presence of the user's body is interpreted as a sign of driftthat requires compensation, and the resulting over-compensation mayrender the key or button actually insensitive to touch for a period oftime.

SUMMARY

Improved capacitive sensor operation is achieved with improveddiscrimination between environmental drift and apparent driftattributable to human proximity to the sensor. A proximity algorithmdetects conditions which are interpreted as indicating a user is closeto, but not touching, a sensor. When such proximity is detected, ambientvalue calibration is halted, thereby avoiding treating the human'sproximity as environmental drift requiring compensation and preventingmiscalculation of calibration. The proximity algorithm employs twomoving average filters to monitor the CDC output values over time and tomake appropriate adjustments to a signal representing the ambient, whiledistinguishing environmental draft from proximity induced pseudo-drift.

Both the methods employing the proximity algorithm and apparatusembodying capacitance sensor signal processing are included as aspectsof the invention.

According to a first aspect, a method of operating a capacitive sensorassembly having at least one capacitive sensor element and acapacitance-to-digital converter (CDC) that supplies output codescorresponding to sensor element capacitance, comprises acts ofdetermining an ambient value of the CDC output codes; modifying at leastone threshold value in response to changes in said ambient value; anddetecting proximity of a ground mass to the sensor element andpreventing the modification of threshold values while said proximity isdetected. The ground mass may be a portion of a human body, such as ahand or finger. Such method may further comprise generating an outputsignal indicating when a CDC output code exceeds in magnitude arespective threshold value.

According to another aspect, a method of operating a capacitive sensorassembly having at least one capacitive sensor element and acapacitance-to-digital converter (CDC) that supplies output codescorresponding to sensor element capacitance, comprises using a proximityalgorithm to detect conditions which are interpreted as indicating auser is close to, but not touching, a sensor element and then haltingambient value calibration while said condition or conditions persist.The proximity algorithm may employ two moving average filters to monitorthe CDC output values over time and to make appropriate adjustments to asignal representing the ambient, while distinguishing environmentaldraft from proximity induced pseudo-drift. For example, said filters maycomprise a Fast Filter and a Slow Filter, the Fast Filter inputreceiving the CDC output values and averaging a predetermined number ofCDC output values to produce a sequence of Fast Filter Average values;the Slow Filter input receiving the Fast Filter Average values andgenerating a new output value only if proximity of a ground mass is notdetected and the CDC output values are changing slowly.

According to another aspect, a method is provided of operating acapacitive sensor assembly comprising at least one capacitive sensorelement and a capacitance-to-digital converter (CDC) that suppliesoutput codes corresponding to sensor element capacitance. The methodcomprises acts of determining an ambient value of the CDC output codes;modifying at least one threshold value in response to changes in saidambient value; and detecting proximity of a ground mass to the sensorelement and preventing the modification of threshold values while saidproximity is detected. The ground mass may be a portion of a human body.Such method may further comprise generating an output signal indicatingwhen a CDC output code exceeds in magnitude a respective thresholdvalue. In such a method, modifying at least one threshold value maycomprise modifying said threshold in dependence on a sensitivity settingto vary an amount of pressure required to signal a valid touch on thesensor element. The threshold may be modified, moreover, in dependenceon a combination of a sensitivity setting and a history of CDC codevariation. Modifying at least one threshold value may further comprisemodifying said threshold in dependence on an offset value. Modifying atleast one threshold value also may further comprise employing ambient,maximum CDC value and minimum CDC value as well as a sensitivity settingto provide a threshold that adapts sensor response to externalconditions. The external conditions may include one or more of anenvironmental condition and a user's finger size.

According to a further aspect, a method is provided of operating acapacitive sensor assembly comprising at least one capacitive sensorelement and a capacitance-to-digital converter (CDC) that suppliesoutput codes corresponding to sensor element capacitance. Such methodcomprises using a proximity algorithm to detect conditions which areinterpreted as indicating a user is close to, but not touching, a sensorelement and then halting ambient value calibration while said conditionor conditions persist. Said proximity algorithm may employ two or moremoving average filters to monitor the CDC output values over time and tomake appropriate adjustments to a signal representing the ambient CDCoutput value, while distinguishing environmental draft from proximityinduced pseudo-drift. Said filters may comprise, for example, a FastFilter and a Slow Filter, the Fast Filter receiving the CDC outputvalues and averaging a predetermined number of CDC output values toproduce a sequence of Fast Filter Average values; the Slow Filterreceiving the Fast Filter Average values and generating a new outputvalue only if proximity of a ground mass is not detected and the CDCoutput values are changing slowly.

According to another aspect, there is shown a method of operating acapacitive sensor assembly having at least one capacitive sensor elementand a capacitance-to-digital converter (CDC) that supplies output codescorresponding to sensor element capacitance. Such method comprisesperforming an ambient value calibration of the CDC output; using aproximity algorithm, processing the CDC output to detect a condition orconditions interpreted as indicating a user is close to, but nottouching, a sensor element; and halting ambient value calibration of theCDC output when the proximity algorithm indicates said condition orconditions persist; where the proximity algorithm employs first andsecond moving average filters to monitor the CDC output values over timeand to detect said condition or conditions. The first and second filtersmay comprise, respectively, a fast filter and a slow filter, the fastfilter receiving the CDC output values and averaging a predeterminednumber of CDC output values to produce a sequence of Fast Filter Averagevalues; the Slow Filter receiving the Fast Filter Average values andgenerating a new output value only if proximity of a ground mass is notdetected and the CDC output values are changing relatively slowly.

According to a still further aspect, there is presented a method ofoperating a capacitive sensor assembly having at least one capacitivesensor element and a capacitance-to-digital converter (CDC) thatsupplies output codes corresponding to sensor element capacitance,comprising using a multi-step proximity algorithm, detecting from outputof the CDC a condition or conditions indicative of a user being closeto, but not touching, a sensor element; and halting ambient valuecalibration of the sensor assembly while said condition or conditionspersist; wherein the proximity algorithm employs at least a first stepand a second step and said first step and said second step applydifferent criteria directly or indirectly to the CDC output, todistinguish environmental drift from proximity induced pseudo-drift. Thedifferent criteria may include different averaging of CDC output values.

According to yet another aspect, a calibration assembly is shown for usewith a capacitive sensor assembly having at least one capacitive sensorelement and a capacitance-to-digital converter (CDC) that suppliesoutput codes corresponding to sensor element capacitance, comprising aprocessor executing one or more sequences of program instructions to:determine an ambient value of the CDC output codes; modify at least onethreshold value in response to changes in said ambient value; and detectproximity of a ground mass to the sensor element and prevent themodification of threshold values while said proximity is detected. Theprocessor may further execute instructions to generate an output signalindicating when a CDC output code exceeds in magnitude a respectivethreshold value. Modifying at least one threshold value may comprisemodifying said threshold in dependence on a sensitivity setting to varyan amount of pressure required to signal a valid touch on the sensorelement. Modifying at least one threshold value may further comprisemodifying said threshold in dependence on an offset value.

A still further aspect is a calibration assembly for use with acapacitive sensor assembly having at least one capacitive sensor elementand a capacitance-to-digital converter (CDC) that supplies output codescorresponding to sensor element capacitance, comprising a processorexecuting instructions to perform a proximity algorithm to detectconditions which are interpreted as indicating a user is close to, butnot touching, a sensor element and then halting ambient valuecalibration while said condition or conditions persist. The proximityalgorithm may employ two (or more) moving average filters to monitor theCDC output values over time and to generate corresponding adjustments toa signal representing the ambient CDC output value, while distinguishingenvironmental draft from proximity induced pseudo-drift. Such movingaverage filters may comprise a Fast Filter and a Slow Filter, the FastFilter input receiving the CDC output values and averaging apredetermined number of CDC output values to produce a sequence of FastFilter Average values; the Slow Filter input receiving a plurality ofthe Fast Filter Average values and generating a new output value only ifproximity of a ground mass is not detected and the CDC output values arechanging relatively slowly.

According to yet another aspect, a calibration assembly is provided fora capacitive sensor assembly having at least one capacitive sensorelement and a capacitance-to-digital converter (CDC) that suppliesoutput codes corresponding to sensor element capacitance. Said assemblycomprises a processor executing instructions to: perform an ambientvalue calibration of the CDC output; use a proximity algorithm toprocessing the CDC output to detect a condition or conditions indicatinga user is close to, but not touching, a sensor element; and halt ambientvalue calibration of the CDC output when the proximity algorithmindicates said condition or conditions persist; the proximity algorithmemploying first and second moving average filters to monitor the CDCoutput values over time and to detect said condition or conditions. Thefirst and second filters may comprise, respectively, a fast filter and aslow filter, the fast filter receiving the CDC output values andaveraging a predetermined number of CDC output values to produce asequence of Fast Filter Average values; the Slow Filter receiving theFast Filter Average values and generating a new output value only ifproximity of a ground mass is not detected and the CDC output values arechanging relatively slowly.

According to one more aspect, a calibration assembly for a capacitivesensor assembly having at least one capacitive sensor element and acapacitance-to-digital converter (CDC) that supplies output codescorresponding to sensor element capacitance comprises a processoradapted to: use a multi-step proximity algorithm to detect from outputof the CDC a condition or conditions indicative of a user being closeto, but not touching, a sensor element; and halt ambient valuecalibration of the sensor assembly while said condition or conditionspersist; wherein the proximity algorithm employs at least a first stepand a second step and said first step and said second step applydifferent criteria directly or indirectly to the CDC output, todistinguish environmental drift from proximity-induced pseudo-drift. Thedifferent criteria may include different averaging of CDC output values.The different criteria also may include at least two different methodsto distinguish environmental drift from proximity-induced pseudo-drift.

Further, elements of these aspects may be combined in ways not expresslyillustrated, but which will be apparent to those skilled in the art.

BRIEF DESCRIPTION OF DRAWINGS

The accompanying drawings are not intended to be drawn to scale. In thedrawings, each identical or nearly identical component that isillustrated in various figures is represented by a like numeral. Forpurposes of clarity, not every component may be labeled in everydrawing. In the drawings:

FIG. 1 is a diagrammatic illustration of a capacitive sensorarchitecture according to the prior art;

FIG. 2 is a waveform corresponding to the architecture of FIG. 1,showing how a CDC output and processor interrupt are generated inrelation to the sensors being touched, for stable ambient conditions;

FIG. 3 is a waveform like FIG. 2, but showing how ambient drift cancause the sensor to become unresponsive;

FIG. 4 is a waveform showing how the sensor responsiveness may becompensated, in theory, for ambient drift;

FIGS. 5A and 5B together are a simplified block diagram of a proximitydetection and ambient calculation aspect of an environmental calibrationalgorithm as presented herein;

FIG. 6 is a plot illustrating how the thresholds are adjusted, with thealgorithm of FIGS. 5A, 5B, according to changes in the ambient value andthe Max and Min sensor values;

FIGS. 7A-7D together are a diagrammatic illustration of an adaptivethreshold determination algorithm for providing environmentalcompensation and distinguishing pseudo drift from environmental drift;

FIGS. 8A-8D collectively comprise a flow chart depicting an operationalflow of an example of a computer program or other implementation of thealgorithm of FIG. 7 (i.e., FIGS. 7A-7D; and

FIG. 9 is a diagrammatic illustration of the relationships used in thethreshold adjustments of FIGS. 7A-7D and FIGS. 8A-8D.

DETAILED DESCRIPTION

This invention is not limited in its application to the details ofconstruction and the arrangement of components set forth in thefollowing description or illustrated in the drawings. The invention iscapable of other embodiments and of being practiced or of being carriedout in various ways. Also, the phraseology and terminology used hereinis for the purpose of description and should not be regarded aslimiting. The use of “including,” “comprising,” or “having,”“containing,” “involving,” and variations thereof herein, is meant toencompass the items listed thereafter and equivalents thereof as well asadditional items.

As more fully described below, an environmental calibration algorithm asprovided herein (and a sensor assembly employing such an algorithm) usestwo moving average filters, called the Fast Filter and the Slow Filter,respectively, to monitor CDC output values over time and to generate orcalculate upper and lower threshold values, UT and LT, respectively. TheUT and LT values are managed for both environmentally-induced drift andproximity-induced “pseudo drift” due to a hovering hand or similarobject. These filters will be explained with reference to a simplifiedblock diagram in FIGS. 5A-5B, though it will be understood that thisblock diagram (or its operation) has an equivalent flow chartrepresentation and, thus, the filters may readily be implemented incorresponding software code. That is, although FIGS. 5A,B may beconstrued by some as a hardware implementation, it is meant rather as adisclosure of operation, however that operation should be embodied.Indeed, the filters are conceived as commonly implemented in softwareexecuted by a programmable processor, such as a microprocessor, or in anASIC (application-specific integrated circuit). (References to a“processor” shall be understood to refer to any kind of informationprocessor, analog or digital, notwithstanding any reference to programsor instructions.) Thus, each or any block in the block diagram might beimplemented as a block of program code rather than as physicallyinstantiated circuitry comprising switches, comparators and the like.Each physical circuit or circuit element that is illustrated has one ormore well-known software counterparts, and others that can be created bythose skilled in the art. Of course, the processing could be embodied insome other genre of processor element, as well. The invention is notlimited to a specific kind of implementation.

Each of the two moving average filters produces an average value, thoughthey are two different average values, of course. In someimplementations, one or each average is formed as the sum of all valuesof CDC samples in a register of a described predetermined length,divided by the length of the register (i.e., the number of samples orstages or register elements contained in the register). The registersare preferably first-in, first-out (FIFO) registers.

The Fast Filter, indicated generally at 72, employs an N-stage FIFOregister 74. N, the number of stages, is relatively small, such as 8(each stage or element being indicated as one of the constituentrectangles 76-i). Register 74 is updated at frequent intervals (such asonce every 38 ms when operating in full power mode, in an example of animplementation per the AD7142 CDC from Analog Devices, Inc., Norwood,Mass.); the time interval is typically selected as a tradeoff betweenthe required smooth, speedy response of the man-machine interface andpower consumption, with <50 ms response time being generally acceptableas imperceptible to a typical user. The Fast Filter input receives theCDC output on line 78, so the values in the register elements aresuccessive CDC output values. The values in all of the register elements76-i are averaged in averaging stage 82 to produce a Fast Filter Averageresult on line 84, which is a moving average value updated with each newCDC code received.

A suitable mechanism (a number will readily occur to an engineer), notshown, generates a signal on line 86 to control a switch 88. The signalon line 86 indicates whether, for a new CDC code value, an interrupt hasbeen generated, indicative of a threshold having been crossed. If thereis no threshold interrupt for any CDC output (i.e., taking into accountthat there may be multiple keypad entry buttons or other sensors), thesignal on line 86 is asserted and switch 88 is closed, supplying a newCDC output sample to register 74.

By contrast, the Slow Filter is based on a second FIFO register 92 whichis much longer, for example 50 elements, and receives as input not theCDC output but, rather, the Fast Filter Average results. The Slow Filterpreferably is updated (i.e., receives a new input sample and generates anew output value) only if proximity (e.g., of a hand) is not detectedand the CDC output values are changing slowly. Such operation isindicated by the inclusion of switch 94, which selectively connects theFast Filter Average signal to the input of register 92 in response to asignal on line 96. The signal on line 96 is controlled by the proximityalgorithm described above. Such algorithm is shown as implemented atblock 100.

For example, the Slow Filter may be updated only if there is adifference of greater than one CDC code level between twonon-consecutive elements (e.g., the N^(th) and N-4^(th) elements) of theFast Filter FIFO 74. This is indicated by the differencing device 102and value comparator 104. This last condition prevents the Slow Filterfrom catching up with the Fast Filter too quickly.

The Slow Filter is used mostly as a buffer. There are various ways tocalculate a slow average. For example, a mid-point element of the SlowFilter, indicated at line 106, may be used as the calibrated ambientvalue. Or the last element or another element may be used.

However, it is also possible to average the contents of the Slow Filter(in much the same manner as the Fast Filter) to provide the requiredambient value. It has been found that the former method is preferred,but it should be clear the there are almost limitless different ways tofilter a stream of numbers to arrive at an average.

Using this approach, the Fast Filter tracks the output of the CDC andthe Slow Filter lags behind it.

If the user has not touched the sensor for a predetermined period oftime, the system may optionally (but often preferably) be placed in alow power mode (not illustrated). In such a mode, the CDC output updatesthe Fast Filter much more slowly, such as once every 500 mS. Also, inlow power mode, the Slow Filter may be re-sized to fewer elements, suchas 8 elements, as in the Fast Filter, so as to keep the overall time forwhich CDC results are looked at and averaged approximately the samedespite having fewer updates.

As previously stated, a proximity detection algorithm 100 is used toprevent calibration when a user's hand is “hovering” near, but notpressing on, a capacitor (e.g., a key or button). In an exemplaryembodiment, there are two cases under which such a proximity conditionis deemed to occur and a corresponding Proximity signal is asserted.First, the Fast Filter is used as a differentiator to detect a rate ofchange in the CDC output results. A difference is found by block 108between two elements of the Fast Filter FIFO, such as the N^(th) elementand the N-4^(th) element. If this difference exceeds some predeterminednumber, indicated as 4 in block 110, a signal called the Proximitysignal is asserted on line 112 via OR-gate 114. This processing detectsa user approaching the sensor or moving away from the sensor. Second,the Proximity signal is asserted if there is detected a difference of asubstantial number of codes, such as (for example) 75 codes (usingelements 116 and 118, for example), between the Fast Filter Averagesignal value and the ambient value. This is to insure that calibrationdoes not occur if the user hovers over or very slowly approaches thesensor.

Once proximity is detected by either of these two conditions and theProximity signal is asserted, a timer 120 prevents calibration fromoccurring for a predetermined period of time, such as 5 seconds, such asby de-asserting input 122 to AND gate 124. The actual mechanism forimplementing the timer to prevent calibration during that interval willdepend on the specific signal processing implementation which has beenselected, and an appropriate timer mechanism will readily occur to thoseskilled in the art. For example, in a software implementation, a waitloop may be employed, while in a hardware implementation one mightsimply gate the clock inputs of the registers with a signal from aone-shot multivibrator.

As a precaution, the Proximity signal may be reset and deasserted if ithas been asserted for a long time—e.g., more than 20 seconds—and a validtouch interrupt has not occurred. This is called re-calibration and inthe illustrated example is carried out by Re-Calibration Algorithm 130.

In Re-Calibration Algorithm 130, a time out counter 132 is incrementedby three-input AND gate 134 when (a) there is no threshold interruptsignal on line 86, (b) a signal is asserted on line 136 (which occurswhen the Proximity signal is asserted for at least one channel) and (c)a CDC interrupt signal is received for at least one channel. (Note thatthe use of the term “channel” refers to the situation wherein multiplesensors are arranged on a keypad or the like. Each sensor's CDC outputis processed as shown herein and the processing of each CDC output isdone by a separate “channel.” Thus, it is useful, though not alwaysnecessary, to treat all of the sensors alike for calibration purposes,since they are subject to the same environmental conditions andsubstantially the same user proximity. So, a detection of proximity onany one channel may, as illustrated, be treated the same as detection ofproximity in a subject channel.) Logic 138 evaluates the output of timeout counter 132 and asserts an output signal (the TIME OUT signal) online 142 to AND gate 144 when the time out counter reaches apredetermined count, the TIME OUT value (typically representing, e.g.,about 20-25 seconds). When the TIME OUT signal is asserted as well asthe Proximity signal for the channel (on line 112), AND gate 144 assertsan output on line 146. In turn, this initializes registers 74 and 92with the then-current CDC value. Counter 132 is reset by OR gate 148when (a) block 110 asserts an output indicating a rapid rate of change,or (b) AND gate 144 asserts an output, or (c) the block 110 for someother channel (sensor) asserts a signal on line 152.

Where the device includes multiple sensors, such as a device that wouldhave a numeric keyboard, each key or button of which has its own sensor,or where the keystroke is deduced from a matrix of sensors (potentiallyminimizing the number of sensors, as known in the art), there-calibration algorithm used to reset the registers 74 and 92 (and,thus, the Proximity signal) may be common to all or a group of the keys,to reduce hardware or processing requirements.

Thus, if the Proximity signal is asserted for any key and no valid touchinterrupt has occurred, the timer is started and it increments on eachinterrupt after a new CDC conversion. Three non-limiting ways arepresented for resetting this timer. First, as noted above, the FastFilter stage can be used as a differentiator to detect a rate of changein the CDC output results greater than a predetermined threshold value.For example, if there is a difference greater than a predeterminedthreshold, such as 4, between two elements (e.g., the N^(th) element andthe N-4^(th) element) of the Fast Filter FIFO, then the timer can bereset, as this condition indicates a user approaching the sensor duringthe re-calibration period. Second, the timer can be reset when such arate of change is detected for any other key or when the timer reaches atime out value. In turn, the TIME OUT value depends on the CDC updaterate. Typically, it may be set to give an approximate time out of 25seconds in the 500 mS update rate mode. Third, once the timer 132reaches the TIME OUT value and the Proximity signal is reset for thatparticular key (channel), the Fast and Slow Filters are initialized withthe then-current CDC value, to clear the Proximity signal for thatchannel and reset the timer. The Fast Filter Average result and theambient value are recalculated on the next CDC interrupt. Alternatively,they can be initialized to the current CDC value at the same time as theFast and Slow Filters.

The re-calibration algorithm allows for a graceful recovery from anerror condition which has caused proximity to be asserted for too long.As described above, if Proximity is set for too long (but the thresholdis not exceeded), such as due to some unusual finger hovering scenariocombined with substantial environmental change, then this could start tobecome an issue because during a proximity event (i.e., when theProximity signal is asserted), analysis of environmental changes issuspended. Generally, the two-step proximity/threshold combination workswell. But if a false Proximity signal is somehow asserted, it isimportant that there be some mechanism to automatically exit orterminate this condition after some time. The re-calibration algorithmis thus complementary to the core proximity algorithm.

In the wider sense, there may be other situations (known in the art)where recalibration is necessary, such as to recover from errorconditions. The algorithm(s) shown herein is designed to becomplimentary to these methods.

Adaptive Threshold Algorithm

So far, there has been no explanation as to how to adapt CDC processingto compensate for drift in the ambient level while screening outpseudo-drift. With a calibrated ambient level, however, the thresholdlevels can be made to adaptively track the ambient value (i.e., aboveand below). In the case of differential sensors, these thresholds can beplaced on either “side” of the ambient value. A valid touch is thendetected when the upper or lower threshold is exceeded by the currentCDC value.

At the start of an exemplary threshold adaptation algorithm, thethreshold or thresholds are initialized with a starting value foundduring characterization of the sensor. For example, assuming there is tobe an upper threshold (UT) and a lower threshold (LT), the upperthreshold initial value may be set to about the mid-point between theambient value and the expected maximum (Max) sensor value, and the lowerthreshold may be set approximately midway between the ambient value andthe expected minimum (Min) sensor value. The expected Max and Minaverage values preferably are initialized with starting values which maybe based on a priori characterization of a sensor. These Max and Minaverage values and the upper and lower threshold values then self-learnand adapt as the user touches the sensor. Thus, over time, theadaptation algorithm improves the accuracy of those values.

The Max and Min average values preferably are updated as a function ofhow much pressure a user applies when touching the sensor.

A typical operation according to this approach is shown in FIG. 6. Ininterval T1-T2, a fast update is performed of the Max FIFO and MaxAverage values. Then in interval T3-T4, a fast update is performed ofthe Min FIFO and Min Average values. The magnitude of the Max Averagevalue steps up again during the T5-T6 interval, as does the magnitude(in a negative direction) of the Min Average value during intervalT7-T8. When the CDC current value indicates the threshold is no longerexceeded, a monostable multivibrator operates to count out anappropriate time from T9-T10. At time T11, the monostable times out andthe threshold values are updated according to the new Max and Minaverage values. At time T12, the current CDC value goes below thethreshold. If the last CDC value is within (e.g.,) 20% of the Maxaverage, the Max FIFO is updated using an averaging technique. At timeT13, when the current CDC value goes above the threshold, the Min FIFOis updated using an averaging technique, provided the last “touched”value is within some range (e.g., 20%) of the Min average value. Fromtime T14, the monostable again operates. When it stops, the Min and Maxaverage values have changed; therefore, the threshold values are updatedand the ambient value tracks environmental changes and the other curvesare calibrated so as to track the changes in the ambient.

A block diagram of an illustrative example of an adaptation algorithm isshown in FIGS. 7A-7D. Quick Update Module 202 receives three inputs: (1)a signal on line 204 indicating the CDC output code value is inside thebounds of the minimum offset (ABS Minimum Offset; see below, “ABS”referring to absolute value) and maximum offset (ABS Maximum Offset; seebelow), and the threshold has been exceeded (i.e., threshold interruptis detected); (2) the CDC value on line 206; and (3) a signal on line208 representing a maximum average value of the current output of theCDC in the touched condition. If the current CDC value exceeds the upperor lower threshold and then exceeds the Max or Min average,respectively, then the Max or Min FIFO values, respectively, in FIFOs212 and 214 are set equal by the Quick Update Module 202 to the currentCDC value on line 206 until the Max or Min CDC value is reached duringthat particular touch incident. Thus, the ABS Minimum and MaximumOffsets are clamp values which stop much larger than expected CDC valuesfrom entering this block. For example, if the typical change expectedfrom no touch to touch is 1000 codes, then the ABS Max. or Min. Offsetvalues might be set to 2 to 5 times this value. This process is referredto as a quick update of the FIFO and the average values.

If the user does not apply a lot of pressure while touching the sensor,the Max and Min average values should be brought back within rangeslowly over time. This is done using an averaging technique and theprocess is referred to as the slow update process. Slow Update Module222 calculates “slow” updating Max values with respect to the upperthreshold, whereas by symmetry Slow Update Module 224 does likewise forthe Min value for the lower threshold. Modules 222 and 224 receive theirinput from a two-element FIFO register 223 that, in turn, selectivelyreceives CDC output code samples via a controlled switch 225A and alogic network 225B. Switch 225A is closed and delivers CDC output codesamples when the CDC output code value is inside the bounds of theminimum offset and maximum offset, and the threshold has been exceeded.If the current CDC value processed by modules 222 and 224 exceeds theupper or lower thresholds and reaches a new Max or Min value which isgreater than the threshold value plus a predetermined (preferablyprogrammable) amount (e.g., 40-90% of the range from the threshold valueto the Max or the Min average), then the Max or Min value in registers212, 214 respectively, is updated with this new Max or Min value oncethe CDC value falls within the upper and lower threshold values.

Care should be taken to update the registers only once after each validtouch. The FIFO contents are then averaged to provide a new Max or Minaverage value.

Preferably, a boundary (not shown) is also placed on how close the Maxor Min average values can be reduced toward the ambient value, to avoidthe thresholds being adjusted too close to the ambient level. This valueis initialized at the start of the algorithm.

When a user is not in contact with the sensor and proximity is notdetected, the threshold algorithm calibrates normally and the upper andlower threshold values are adjusted based on the new Max and Min averagevalues. Until a user comes into proximity or contact with the sensor, itis only necessary to adapt to environmental changes. As the environmentchanges, the ambient value on line 106 tracks these changes. Acalculation module 230 adjusts the upper and lower threshold values as afunction of the ambient value. During this calibration, the Max and MinFIFOs 212, 214 are also adjusted to track the ambient value. This isdone by initializing all the values in the FIFO with a fixed offsetsupplied by subtracters 232, 234. This fixed offset corresponds to thecurrent Max or Min average value less the ambient value. These upper andlower offsets from subtracters 232, 234 are also used to calculate theupper and lower threshold values as a function of the activationsensitivity setting for the sensor. For example, sixteen programmablesensitivity ranges may be used to position the thresholds between theambient value and the upper and lower threshold values. Arithmeticmodules 242, 244 calculate the upper and lower threshold values, usingformulas such as provided below.

The sixteen sensitivity settings (see FIG. 8) may range between (forexample) 25% and 100% of the difference between the ambient value andthe Max or Min average values. A sensitivity setting of 0 places thethresholds at the 25% value, making the sensor most sensitive. Thatmeans a small pressure will be required on the sensor to effect a validtouch. Conversely, a sensitivity setting of 15 (i.e., full scale),places the thresholds at the 100% value, making the sensor leastsensitive. That is, a heavy touch will be needed to activate the sensor.(That is, a light touch involves only a small area of the user's fingerbeing applied to the capacitor or an overlay, while a heavier touchbrings more surface area into contact with the capacitor or capacitoroverlay and thus results in a greater change in capacitance.) Experiencehas shown that a mid-range setting of 8 is optimal (in an approximatesense), but this will be dependent on the design and the user.

The following (or similar) formulae may be used (e.g., in modules 242,244) to calculate the thresholds:${UT} = {{{Amb} + \left( \frac{UO}{4} \right) + {\left( \frac{\left( {{UO} - \frac{UO}{4}} \right)}{16} \right) \times S}} = {{Amb} + \left( \frac{UO}{4} \right) + \frac{3 \times {UO} \times S}{64}}}$${LT} = {{{Amb} - \left( \frac{LO}{4} \right) - {\left( \frac{\left( {{LO} - \frac{LO}{4}} \right)}{16} \right) \times S}} = {{Amb} - \left( \frac{UO}{4} \right) - \frac{3 \times {LO} \times S}{64}}}$

where UT=Upper Threshold

-   -   Amb=the ambient value    -   UO=Upper Offset, sometimes referred to as the maximum average        value    -   S=Sensitivity    -   LT=Lower Threshold    -   LO=Lower Offset, sometimes referred to as the minimum average        value

These relationships are illustrated in FIG. 9, showing the thresholdsresulting from selected sensitivity settings. Note that these formulaedo not, with a sensitivity scale from 0 to 15, allow the thresholds tocollide with the maximum and minimum average values; a margin is builtin.

The block diagram of FIGS. 7A-7D was used to show, diagrammatically,both a potential hardware implementation and an algorithm. Note that theinvention is in no way intended to be limited to this example, which ispresented for illustration purposes only.

Further understanding may be obtained from consideration of aconventionally-styled flow chart 800 expounding an implementation of thealgorithm of FIGS. 7A-7D, which flow chart appears as FIGS. 8A-8D.

The process starts at entry point 802. The first act to be performed isa determination of whether a threshold interrupt has occurred (i.e., hasbeen detected). This occurs at act 804. In the absence of a thresholdinterrupt, control branches to a calibration process, indicated byterminus 806 (connecting to other, matching terminus node indicators 806on other drawing sheets). Two calibration paths are actuated (orentered), at nodes 808 and 810, respectively. From node 808, in act 812,the upper offset value is computed and set equal to the maximum averagevalue less the ambient value on the current channel. A test is then madefor the occurrence of a threshold interrupt and detection of a proximitysignal on at least one channel, in act 814. If the test indicates that athreshold interrupt occurred and a proximity signal was asserted on atleast one channel, the calibration ends, at terminus 816. On the otherhand, if the test indicates the absence of a threshold interrupt or aproximity signal, then in act 818 a new upper threshold value iscalculated and the calibration routine ends as noted at terminus 820. Asimilar process occurs with respect to the lower offset value. From node810, in act 822, the lower offset value is computed and set equal to theambient value on the current channel less the minimum average value. Atest is then made for the absence of a threshold interrupt and absenceof a proximity signal on all channels, in act 824. If the test indicatesthat either a threshold interrupt occurred or a proximity signal wasasserted on at least one channel, the calibration ends, at terminus 826.On the other hand, if the test indicates the absence of a thresholdinterrupt and of proximity signals, then in act 828 a new lowerthreshold value is calculated, and the calibration routine ends, asindicated at terminus 830.

If, however, a threshold interrupt has been detected, then two-elementFIFO register 223 is updated. Act 840. Processing then proceeds inparallel along two branches, the first branch starting at act 842 andthe second, at act 844. Going down the first branch, in act 842, adecision or test is conducted to determine whether the value of the lastelement of FIFO 223 plus 10 (for example, or another appropriate value)is greater than the value of the first element. If the answer isnegative, the process ends at terminus 846. If the answer isaffirmative, then an update is performed to the temporary MAX (maximum)value, in act 848. Next, in act 850, a calculation is made of theaverage MAX value less the High Threshold value and a predeterminedpercentage of that amount is calculated. Then the result is added to theHigh Threshold value. Act 852. The resulting number is compared to thetemporary MAX value of step 848 and if the former is greater than orequal to the temporary MAX value, the process ends at terminus 856;otherwise, control advances to act 858. There, the average MAX value istested against the temporary MAX value. If the former is greater than orequal to the latter, the process ends at terminus 860. Otherwise,control proceeds to act 862, which is another testing operation. In act862, the test is whether there has been detected a threshold interrupton any channel. If there has been an interrupt, then the process ends atterminus 864. Otherwise, in act 866 the Max FIFO is updated with thetemporary MAX value and then in act 868, the average MAX value iscalculated.

Control proceeds from node 808 as indicated above.

Turning back to the second path that starts with act 844, such act is atest whether the value of the last element of FIFO 223 less 10 (forexample, or another appropriate value) is less than the value of thefirst element. If the answer is negative, the process ends at terminus870. Otherwise, control proceeds to act 872, wherein the temporary MINvalue is updated. Then, in act 872, a calculation is made of the LowThreshold value less the Average MIN value and a predeterminedpercentage of that amount is calculated. Then the result is subtractedfrom the Low Threshold value. Act 876. The resulting number is comparedto the temporary MIN value of step 872 and if the former is greater thanor equal to the temporary MIN value, the process ends at terminus 880;otherwise, control advances to act 882. There, the Temporary MIN valueis tested against the Average MIN value. If the former is less than orequal to the latter, the process ends at terminus 884. Otherwise,control proceeds to act 886, which is another testing operation. In act886, the test is whether there has been detected a threshold interrupton any channel. If there has been an interrupt, then the process ends atterminus 888. Otherwise, in act 890, the Min FIFO is updated with thetemporary MIN value and then in act 892, the average MIN value iscalculated.

Control proceeds from node 810 as indicated above.

Backing up on the flow chart, at the same time that the two-element FIFOis updated in act 840, two other processing chains are started, inparallel, beginning at acts 902 and 904.

In act 902, it is determined whether there is a threshold interruptpending on the current channel. If the answer is negative, processingends at terminus 906. If the answer is affirmative, processing continueto act 908. There, a test is performed to determine whether the currentCDC output value is greater than the average MAX value. If the answer isnegative, processing ends at terminus 910. If the answer is affirmative,then in act 912 the Max FIFO is re-initialized with the current CDCvalue and in act 914 the average MAX value is re-initialized to the samenumber. Control then proceeds to node 808.

On the parallel path, in act 904, it is determined whether there is athreshold interrupt pending on the current channel. If the answer isnegative, processing ends at terminus 916. If the answer is affirmative,processing continue to act 918. There, a test is performed to determinewhether the current CDC output value is lower than the average MINvalue. If the answer is negative, processing ends at terminus 920. Ifthe answer is affirmative, then in act 922 the Min FIFO isre-initialized with the current CDC value and in act 924 the average MINvalue is re-initialized to the same number. Control then proceeds tonode 810.

The foregoing is an example of a technique that may be used and presentsanother view of the information processing also depicted in FIGS. 7A-7D.It will be appreciated, of course, that the invention may be practicedin other implementations.

Having thus described several aspects of at least one embodiment of thisinvention, it is to be appreciated various alterations, modifications,and improvements will readily occur to those skilled in the art. Suchalterations, modifications, and improvements are intended to be part ofthis disclosure, and are intended to be within the spirit and scope ofthe invention. Accordingly, the foregoing description and drawings areby way of example only.

1. A method of operating a capacitive sensor assembly comprising atleast one capacitive sensor element and a capacitance-to-digitalconverter (CDC) that supplies output codes corresponding to sensorelement capacitance, comprising acts of: a. determining an ambient valueof the CDC output codes; b. modifying at least one threshold value inresponse to changes in said ambient value; and c. detecting proximity ofa ground mass to the sensor element and preventing the modification ofthreshold values while said proximity is detected.
 2. The method ofclaim 1, wherein the ground mass is a portion of a human body.
 3. Themethod of claim 1, further comprising generating an output signalindicating when a CDC output code exceeds in magnitude a respectivethreshold value.
 4. The method of claim 1 wherein modifying at least onethreshold value comprises modifying said threshold in dependence on asensitivity setting to vary an amount of pressure required to signal avalid touch on the sensor element.
 5. The method of claim 4 wherein saidthreshold is modified in dependence on a combination of a sensitivitysetting and a history of CDC code variation.
 6. The method of claim 4wherein modifying at least one threshold value further comprisesmodifying said threshold in dependence on an offset value.
 7. The methodof claim 4 wherein modifying at least one threshold value furthercomprises employing ambient, maximum CDC value and minimum CDC value aswell as a sensitivity setting to provide a threshold that adapts sensorresponse to external conditions.
 8. The method of claim 7 wherein saidexternal conditions may include one or more of an environmentalcondition and a user's finger size.
 9. A method of operating acapacitive sensor assembly comprising at least one capacitive sensorelement and a capacitance-to-digital converter (CDC) that suppliesoutput codes corresponding to sensor element capacitance, comprisingusing a proximity algorithm to detect conditions which are interpretedas indicating a user is close to, but not touching, a sensor element andthen halting ambient value calibration while said condition orconditions persist.
 10. The method of claim 9 wherein said proximityalgorithm employs two moving average filters to monitor the CDC outputvalues over time and to make appropriate adjustments to a signalrepresenting the ambient CDC output value, while distinguishingenvironmental draft from proximity induced pseudo-drift.
 11. The methodof claim 10 wherein said filters comprise a Fast Filter and a SlowFilter, the Fast Filter receiving the CDC output values and averaging apredetermined number of CDC output values to produce a sequence of FastFilter Average values; the Slow Filter receiving the Fast Filter Averagevalues and generating a new output value only if proximity of a groundmass is not detected and the CDC output values are changing slowly. 12.A method of operating a capacitive sensor assembly having at least onecapacitive sensor element and a capacitance-to-digital converter (CDC)that supplies output codes corresponding to sensor element capacitance,comprising: a. performing an ambient value calibration of the CDCoutput; b. using a proximity algorithm, processing the CDC output todetect a condition or conditions interpreted as indicating a user isclose to, but not touching, a sensor element; and c. halting ambientvalue calibration of the CDC output when the proximity algorithmindicates said condition or conditions persist; d. the proximityalgorithm employing first and second moving average filters to monitorthe CDC output values over time and to detect said condition orconditions.
 13. The method of claim 12 wherein said first and secondfilters comprise, respectively, a fast filter and a slow filter, thefast filter receiving the CDC output values and averaging apredetermined number of CDC output values to produce a sequence of FastFilter Average values; the Slow Filter receiving the Fast Filter Averagevalues and generating a new output value only if proximity of a groundmass is not detected and the CDC output values are changing relativelyslowly.
 14. A method of operating a capacitive sensor assembly having atleast one capacitive sensor element and a capacitance-to-digitalconverter (CDC) that supplies output codes corresponding to sensorelement capacitance, comprising: a. using a multi-step proximityalgorithm, detecting from output of the CDC a condition or conditionsindicative of a user being close to, but not touching, a sensor element;and b. halting ambient value calibration of the sensor assembly whilesaid condition or conditions persist; wherein the proximity algorithmemploys at least a first step and a second step and said first step andsaid second step apply different criteria directly or indirectly to theCDC output, to distinguish environmental drift from proximity inducedpseudo-drift.
 15. The method of claim 14 wherein the different criteriainclude different averaging of CDC output values.
 16. A calibrationassembly for use with a capacitive sensor assembly having at least onecapacitive sensor element and a capacitance-to-digital converter (CDC)that supplies output codes corresponding to sensor element capacitance,comprising a processor executing one or more sequences of programinstructions to: a. determine an ambient value of the CDC output codes;b. modify at least one threshold value in response to changes in saidambient value; and c. detect proximity of a ground mass to the sensorelement and prevent the modification of threshold values while saidproximity is detected.
 17. The assembly of claim 16, wherein theprocessor further executes instructions to generate an output signalindicating when a CDC output code exceeds in magnitude a respectivethreshold value.
 18. The assembly of claim 16 wherein modifying at leastone threshold value comprises modifying said threshold in dependence ona sensitivity setting to vary an amount of pressure required to signal avalid touch on the sensor element.
 19. The assembly of claim 18 whereinmodifying at least one threshold value further comprises modifying saidthreshold in dependence on an offset value.
 20. A calibration assemblyfor use with a capacitive sensor assembly having at least one capacitivesensor element and a capacitance-to-digital converter (CDC) thatsupplies output codes corresponding to sensor element capacitance,comprising a processor executing instructions to perform a proximityalgorithm to detect conditions which are interpreted as indicating auser is close to, but not touching, a sensor element and then haltingambient value calibration while said condition or conditions persist.21. The assembly of claim 20 wherein said proximity algorithm employstwo moving average filters to monitor the CDC output values over timeand to generate corresponding adjustments to a signal representing theambient CDC output value, while distinguishing environmental draft fromproximity induced pseudo-drift.
 22. The assembly of claim 21 whereinsaid moving average filters comprise a Fast Filter and a Slow Filter,the Fast Filter input receiving the CDC output values and averaging apredetermined number of CDC output values to produce a sequence of FastFilter Average values; the Slow Filter input receiving a plurality ofthe Fast Filter Average values and generating a new output value only ifproximity of a ground mass is not detected and the CDC output values arechanging relatively slowly.
 23. A calibration assembly for a capacitivesensor assembly having at least one capacitive sensor element and acapacitance-to-digital converter (CDC) that supplies output codescorresponding to sensor element capacitance, comprising a processorexecuting instructions to: a. perform an ambient value calibration ofthe CDC output; b. use a proximity algorithm to processing the CDCoutput to detect a condition or conditions indicating a user is closeto, but not touching, a sensor element; and c. halt ambient valuecalibration of the CDC output when the proximity algorithm indicatessaid condition or conditions persist; d. the proximity algorithmemploying first and second moving average filters to monitor the CDCoutput values over time and to detect said condition or conditions. 24.The calibration assembly of claim 23 wherein said first and secondfilters comprise, respectively, a fast filter and a slow filter, thefast filter receiving the CDC output values and averaging apredetermined number of CDC output values to produce a sequence of FastFilter Average values; the Slow Filter receiving the Fast Filter Averagevalues and generating a new output value only if proximity of a groundmass is not detected and the CDC output values are changing relativelyslowly.
 25. A calibration assembly for a capacitive sensor assemblyhaving at least one capacitive sensor element and acapacitance-to-digital converter (CDC) that supplies output codescorresponding to sensor element capacitance, comprising a processoradapted to: a. use a multi-step proximity algorithm to detect fromoutput of the CDC a condition or conditions indicative of a user beingclose to, but not touching, a sensor element; and b. halt ambient valuecalibration of the sensor assembly while said condition or conditionspersist; wherein the proximity algorithm employs at least a first stepand a second step and said first step and said second step applydifferent criteria directly or indirectly to the CDC output, todistinguish environmental drift from proximity-induced pseudo-drift. 26.The assembly of claim 25 wherein the different criteria includedifferent averaging of CDC output values.
 27. The assembly of claim 25wherein the different criteria include at least two different methods todistinguish environmental drift from proximity-induced pseudo-drift. 28.The assembly of claim 18 wherein modifying said threshold in dependenceon a sensitivity setting further comprises employing ambient, maximumCDC value and minimum CDC value as well as a sensitivity setting toprovide a threshold that adapts sensor response to external conditions.